# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-progressbar
_pkgname=python-progressbar
pkgdesc='A progress bar for Python.'
pkgver=2.5
pkgrel=1
url='https://github.com/WoLpH/python-progressbar'
license=('BSD')
arch=('any')
depends=('python2' 'python2-utils')
makedepends=('python2-setuptools' 'python2-utils')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('86a56a573b903b947baac98b26f88e40072603007fdf5cda3e4a7e797fe4c4c42fd1a4b1ddb1c9ca9a062659d3647c428e33949e2df9e20b0f56a9a4099de51b')

build() {
  cd "$_pkgname-v$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-v$pkgver"

  python2 setup.py install --root="$pkgdir" -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

